#domainsTable {
    td {
        padding: 10px 1rem;
    }
}

.pm_form .toolbar-button-options label {
    display: inline-block;
    cursor: pointer;
}

.toolbar-button-options .pm_buttons a:first-of-type {
    border-radius: 2px 0 0 2px;
}

.pm_tabs.domainMenu {
    font-size: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: row;
        -ms-flex-direction: row;
            flex-direction: row;
    li {
        -webkit-flex-grow: 1;
            -ms-flex-positive: 1;
                flex-grow: 1;
                float: none;
                display: -webkit-flex;
                display: -ms-flexbox;
                display: flex;
        a {
            padding: .5rem 1rem;
            width: 100%;
            text-align: center;
            height: auto;
            line-height: 1rem !important;
            &.disabled {
                opacity: .5;
                pointer-events: none;
            }
        }
    }
}

#newUser {
    .newUser {
        padding-left: 2rem;
        clear: both;
        float: left;
        width: 100%;
        padding-bottom: 2rem;
    }
    label {
        position: relative;
        input {
            position: absolute;
            left: -2rem;
            top: .5rem;
            margin: 0;
        }
    }
}

#settingsAppearance {
    label {
        cursor: pointer;
    }

    .visual-label {
        flex-wrap: wrap;
    }

    .visual-label-lineBreak {
        display: block;
        width: 100%;
        margin-top: 10px;
    }
}

#pm_settings {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    height: 100%;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
    #settingsSave {
        margin: 15px 25px 15px 0;
    }
    #accessLog {
        .fa {
            margin-right: .5rem;
        }
    }
    #paymentMethodsTable {
        .number {
            width: auto;
        }
        .expiration {
            width: 9rem;
        }
        .type {
            width: 9rem;
        }
        .actions {
            width: 9rem;
            text-align: right;
        }
    }
    #tableSubscription {
        .price {
            width: 4rem;
        }
    }
    #settingsSelect {
        display: none;
    }
    #cancelTables {
        .pm_table {
            table-layout: initial !important;
            margin-bottom: 0;
        }
    }
    .well {
        padding: 25px;
        border: 1px solid $border;
    }
    .usage {
        position: relative;
        em {
            font-style: normal;
            display: block;
        }
        .used {
            left: 0;
            padding-right: 1rem;
            text-align: right;
        }
        .total {
            right: 0;
            padding-left: 1rem;
        }
        .used,
        .total {
            color: $default-color-light;
            position: absolute;
            background: $white;
            height: 30px;
            line-height: 30px;
            width: 5rem;
        }
        .bar {
            position: absolute;
            left: 5rem;
            right: 5rem;
            top: 13px;
            height: 4px;
            background: $light;
            .amount {
                position: absolute;
                left: 0;
                top: 0;
                bottom: 0;
                background: $primary;
            }
        }
    }
    .pm_tabs {
        padding: 0 9px;
        display: block;
        width: 100%;
        background: $header-background;
        overflow: hidden;
        li {
            height: 40px;
            line-height: 40px;
            a.pm_button {
                font-size: .65rem;
                border-color: $header-background;
                background: rgba(255,255,255,.8);
                color: $button-color;
                border-bottom: none;
                padding: 0 1rem;
                height: 40px;
                line-height: 40px;
                overflow: hidden;
                position: relative;
                float: left;
                border-bottom: 1px solid $header-background;
                &:hover {
                    background: rgba(255,255,255,.85);
                }
            }
        }
        li.active {
            a.pm_button {
                background: $white;
                color: $primary;
                border-bottom-color: $white;
            }
        }
    }
    .settings {
        padding: 0 25px 2rem 25px;
        margin-right: 0;
        clear: both;
        height: 100%;
        overflow: auto;
        -webkit-overflow-scrolling: touch;

        .angular-squire-wrapper {
            border: 1px solid $border;
            display: flex;
            iframe {
                flex:1;
                max-width: 100%;
            }
        }
        .squireToolbar-select-list {
            min-height: 7em;
        }

        .squireSelectFontFamily-container .squireToolbar-select-view {
            width: 50px;
        }

        .squireToolbar-container {
            border-width: 1px 1px 0 1px;
            border-style: solid;
            border-color: $border;
        }
        [class*="squireToolbar-action-"] { padding: 0 }
        .squireToolbar-text-mode { display: none }

        .pm_buttons .fa.fa-angle-down {
            padding: 0 .5rem;
        }
        #keys-addressTable {
            td {
                background: transparent;
                span {
                    float: left;
                    margin-right: 1rem;
                }
                .fa {
                    font-size: 1.25rem;
                }
                .fa-times-circle {
                    color: $red;
                }
                .fa-check {
                    color: $default-color;
                }
            }
        }
        table {
            .invoice {
                width: 4rem;
            }
            .price {
                width: 6rem;
            }
            .date {
                width: 12rem;
            }
            .pm_button {
                white-space: nowrap;
            }
        }
        .row {
            padding: 2rem 0 1rem;
            clear:both;
            .border-bottom {
                border-bottom: 1px solid $border;
            }
            .clearfix {
                padding: 5px;
                margin: 0 -5px;
            }
            .setting {
                .pm_table {
                    td {
                        strong {
                            display: block;
                        }
                        small strong {
                            display: inline-block;
                        }
                    }
                }
                .radio {
                    display: inline-block;
                    img {
                        max-width: 100%;
                    }
                }

                #aliases-container {
                    ul {
                        li {
                        }
                    }
                }
            }
        }
    }
}

.usersTable {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}
.usersTable td,
.usersTable th {
    padding: .8rem;
    border-bottom: 1px solid rgba($border, .1);
    text-align: left;
    font-weight: normal;
}
.usersTable th {
    vertical-align: top;
}
.usersTable .nowrap {
    white-space: nowrap;
}
.usersTable-domainList {
    max-width: 100%;
    margin-right: .5ch;
}


body.appConfigBody-is-mobile {
    #pm_settings {

        .settings .row .setting {
            width: 100%;
            margin-bottom: 2rem;
        }
        #logActions {
            float: left;
            margin: 0 0 1rem -5px;
            clear: both;
        }

        #logArea {
            padding-top: 2rem;
        }

        .settings { padding: 0 10px }
        .pm_tabs {
            padding-left: 10px;
            .pm_button {
                padding: 0 8px;
            }
        }
    }
    #newUser{
        .newUser {
            .pm_grid {
                .col-1-3 {
                    width: 33% !important;
                    clear: none;
                    margin-right: 1rem;
                }
            }
        }
    }

    #pm_settings {
        .settings {
            margin-right: 0;
            .pm_table tr {
                display: table-row;
                width: initial;
                border: none;
                td,
                th {
                    display: table-cell;
                    width: initial;
                }
            }
        }
    }
}

body.appConfigBody-is-mobile {

    #newUser{
        .newUser {
            padding-left: 0;
        }
        label {
            input {
                position: static;
                margin-right: .5rem;
            }
        }
    }
    #pm_settings {
        .settings {
            padding: 0 10px;
        }
        #settingsSelect {
            display: block;
            margin: 10px;
            border: none;
            position: relative;
            .pm_button {
                margin-bottom: 1rem;
            }
        }
        .well {
            padding: 0;
            border: none;
        }
        .pm_tabs {
            background: $white;
            padding:10px;
            > li {
                margin:0 0 0.5rem 0.25rem;
                > a.pm_button {
                    height: 35px;
                    line-height: 35px;
                    padding: 0 10px;
                    cursor: pointer;
                    font-size: 12px;
                    color: #666;
                    border: 1px solid $border;
                    border-radius: 2px;
                    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
                    transition: all 0.3s ease-out 0s;
                    -webkit-tap-highlight-color: transparent;
                    &:hover {
                        background-color: #fafafa;
                    }
                    &:active,
                    &:focus {
                        background-color: lighten($border, 2%);
                        box-shadow: inset 0 1px 2px 0 rgba(0,0,0,0.05);
                    }

                }
                &.active {
                    > a.pm_button {
                        background-color: $primary;
                        border-color: $primary;
                        color: $white;
                        &:hover {
                            background-color: #7e82b4;
                            border-color: #7e82b4;
                        }
                        &:active,
                        &:focus {
                            background-color: #66669a;
                            border-color: #66669a;
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: $desktop) {
    body #pm_settings {
        #usersTable {
            td {
                .pm_button {
                    line-height: 1.5rem;
                    margin: 0;
                    height: auto;
                    text-decoration: none;
                    padding-left: 0;
                }
            }
        }
    }
}

body.appConfigBody-is-mobile {
    &#secured-invoices,
    &#secured-keys,
    &#secured-members,
    &#secured-domains,
    &#secured-appearance,
    &#secured-security,
    &#secured-labels,
    &#secured-dashboard,
    &#secured-account {
        overflow: initial;
    }
}
body.appConfigBody-is-mobile {
    #pm_settings {
        .settings {
            table.pm_table {
                border: none;
                tr {
                    border: 1px solid $border;
                    display: block;
                    margin-bottom: 2rem;
                    padding: 0;
                    td {
                        display: block;
                        height: auto !important;
                        border-bottom: 1px solid $border;
                        &.text-right {
                            text-align: left;
                        }
                        code {
                            display: none;
                        }
                    }
                }
            }
        }
    }
}

#paymentsModal {
    .disabled {
        input,
        select {
            cursor: default;
            pointer-events: none;
            background-color: $tertiary;
        }
    }

}


body.appConfigBody-is-mobile {
    #invoicesList {
        &, li {
            display: block;
            list-style-type: none;
            margin: 0;
            padding: 0;
        }
        li {
            margin-bottom: 1rem;
            border: 1px solid $border;
            p {
                display: block;
                border-bottom: 1px solid $border;
                padding: .5rem 1rem;
                margin: 0;
                &.title {
                    background: $tertiary;
                }
            }
        }
    }
}

[name="signature"] .squire-popover {
    font-size: .9em;

    [class*="-panel"] {
        padding: .5em 1em;
        margin: 0 !important;
    }
    [class*="-label"] {
        height: auto;
        line-height: 2;
    }
    [class*="-input"] {
        width: 100%;
        margin: 0
    }
    [class*="-footer"] { padding: .5em 1em }
}

[name="signature"] {
    position: relative;
    z-index: 0; /* maximized composer toolbar*/

    .squireSelectColor-container { position: static }
    .colorPopover-selection { display: none }
    .colorPopover-panel { padding-top: 0 !important }
    .squire-popover.squire-popover-second {
        transform: scale(.75);
        left: 0px;
        transform-origin: 20% 100%
    }
}

.ua-ie-11 [name="signature"] .squire-popover [class*="-input"] { padding: .3em 1em }
